import request from "@/utils/request";

/**
 * 新增学生评价记录
 * @param studentId
 * @param description
 * @param evaluationId
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function addStuInfo(studentId,description,evaluationId){
    const data = {
        studentId:studentId,
        description:description,
        evaluationId:evaluationId
    }
    return request.post('/evaluation/add_stu',data);
}

/**
 * 获取id对应的所有学生 （id可以从后端获取判断）
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function getStuNames(){
    return request.get('/evaluation/names')
}

/**
 * 获取所有的评价名称
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function getEvaNames(){
    return request.get('/evaluation/titles')
}


export function addTitle(title){
    return request.post(`/evaluation/add_title?title=${title}`)
}
